<?php
/**
 * Extdb
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://code.google.com/p/extdb/wiki/NewBSDLicence
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category   Extdb
 * @package    Extdb_Webservice
 * @copyright  Copyright (c) 2005-2008 ExtDb. (http://code.google.com/p/extdb/)
 * @license    http://code.google.com/p/extdb/wiki/NewBSDLicence New BSD License
 * @version    $Id: Webservice.php 15 2009-07-29 21:45:57Z luke.richards.99 $
 */

/**
 * Base Webservice Class.
 *
 * @category   Extdb
 * @package    Extdb_Webservice
 * @copyright  Copyright (c) 2005-2008 ExtDb. (http://code.google.com/p/extdb/)
 * @license    http://code.google.com/p/extdb/wiki/NewBSDLicence New BSD License
 */
class Extdb_Webservice
{
    /**
     * Return a class name that matches the requested webservice type.
     *
     * @param string $type
     * @return string
     * @throws Extdb_Webservice_Exception
     */
    public static function getClassName($type)
    {
        $className = 'Extdb_Webservice_' . str_replace(' ', '_', ucwords(str_replace('_', ' ', $type)));
//        require_once $className;
//        if (!class_exists($className)) {
//            throw new Extdb_Webservice_Exception($type . ' is an invalid object type', Extdb_Exception::STATUS_CLIENT_NOT_FOUND);
//        }

        return $className;
    }
}